﻿using Lanbt.Core.Entity.Dto;
using Lanbt.Core.Repository.SqlService.IRepository;
using Lanbt.Core.Service.SqlService.IService;

namespace Lanbt.Core.Service.SqlService
{
    public class DatabaseService : IDatabaseService
    {
        public readonly IDatabaseRepository _databaseRepository;

        public DatabaseService(IDatabaseRepository databaseRepository)
        {
            _databaseRepository = databaseRepository;
        }

        public async Task<ResultOutput<bool>> CreateDatabase() => new ResultOutput<bool>(await _databaseRepository.CreateDatabase());

        public async Task<ResultOutput<bool>> CreateTables() => new ResultOutput<bool>(await _databaseRepository.CreateTables());
    }
}
